package com.pmgames.dao;

import java.util.List;

import com.pmgames.vo.Content;
import com.pmgames.vo.GameObject;
import com.pmgames.vo.Course;
import com.pmgames.vo.Relation;
import com.pmgames.vo.User;

public interface IPmgamesDao {
	
	/**
	*
	* @param user
	* @return state
	*/
	public User createUser(String username, String password, String name, String type);
	
	/**
	*
	* @param username
	* @return
	*/
	public void deleteUser(String username);
	
	/**
	*
	* @param username
	* @param password
	* @return
	*/
	public User logIn(String username, String password);
	
	/**
	*
	* @param subject
	* @return subjectCode
	*/
	public String createSubject(Course subject);
	
	/**
	*
	* @param subjectCode
	* @return
	*/
	public void deleteSubject(String code);
	
	/**
	*
	* @param gameObject
	* @return gameObject
	*/
	public GameObject createGame(GameObject game);
	
	/**
	*
	* @param id
	* @return
	*/
	public void deleteGame(int id);
	
	/**
	*
	* @param id
	* @return gameObject
	*/
	public GameObject editGame(int id);
	
	/**
	*
	* @param URL
	* @return xml(game with loaded word)
	*/
	public Content getWord(GameObject game);
	
	/**
	*
	* @param URL
	* @return xml(game with loaded collection of related words)
	*/
	public List<Content> getWords(GameObject game);
	
	/**
	*
	* @param URL
	* @return xml(word relation)
	*/
	public Relation getRelation(Content word);
	
	/**
	*
	* @param URL
	* @return xml(list of relations)
	*/
	public List<Relation> getRelations(GameObject game, List<Content> words);
	
	/**
	*
	* @param URL
	* @return xml(game with loaded word)
	*/
	public GameObject loadGame(int id);

}
